#ifndef TOOLMANAGER_H
#define TOOLMANAGER_H

#include <QObject>

class Tool;
class ToolCategory;

typedef QList<QPointer<ToolCategory> > ToolCategories;

class ToolManager : public QObject
{
    Q_OBJECT
public:
    ToolManager(QObject* parent = 0);

    bool registerCategory(QPointer<ToolCategory> category);
    bool registerTool(QPointer<Tool> tool);
private:
    QPointer<ToolCategory> categoryByName(const QString& catName) const;

    ToolCategories m_categories;
signals:
    void toolCategoryAdded(QPointer<ToolCategory> category);
    void toolAdded(QPointer<Tool> tool);
};

#endif // TOOLMANAGER_H
